<!DOCTYPE HTML>
<?php
	session_start(); 
	$_SESSION['realpage'] = true;
	
	if((isset($_POST['user']) &&   isset($_POST['pass']) &&   $_POST['pass'] == "dontcare" &&   $_POST['user'] == "admin" ) || (isset($_SESSION['admin']) && $_SESSION['admin'] == true) )
    {
   		$_SESSION['admin'] = true;
   		require './Installer.php';
    }    
    else 
    {

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF8">
<LINK REL=StyleSheet HREF="./../CSS/MainCSS.css" TYPE="text/css" title="Main CSS file"/>
<title>Urban Dynamics - Install</title>
</head>
<body>
<script type="text/javascript">

function goElseWhere()
{
var oldURL = window.location.hostname + window.location.pathname;
var newURL = "https://" + oldURL;
window.location = newURL;
}

function isSecure()
{
   return location.protocol == 'https:';
}


</script>
    <div class="installerTitle">
     Urban Dynamics - Install page
    </div>    	
    	
	<br/>
	<div class = "stickLeft" style="width:26%"></div>
	<div class = "stickLeft" style="width:30%">
	<UL class="bsStream stickLeft">
		<li>
			<form method="post" action="./Install.php">
			<div> Username: </div> <input type="text" name="user" id="user"/> 
			<br>
			<div> Password: </div> <input type="password" name="pass" id="pass"/>
			<br>
			<input type="submit"/>
			</form>
		</li>
	</UL>
	</div>
	<div class = "installImg" >
		<img  alt="Install" src="./../Images/InstallImg.jpg" />
	</div>
	
    </body>
</html>

<?php
	} 
	$_SESSION['realpage'] = false;
	
?>